package com.yyp.car.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yyp.car.Idao.ITeacherDao;
import com.yyp.car.Iservice.ITeacherService;
import com.yyp.car.model.Teacher;

@Service("teacherService")
public class TeacherService implements ITeacherService {
	@Resource(name = "teacherDao")
	private ITeacherDao teacherDao;

	@Override
	public List<Teacher> listTeacher() {
		return teacherDao.listTeacher();
	}

	@Override
	public Teacher addTeacher(Teacher teacher) {
		return teacherDao.add(teacher);
	}

	@Override
	public void updateTeacher(Teacher teacher) {
		teacherDao.update(teacher);
	}

	@Override
	public Teacher load(int id) {
		return teacherDao.load(id);
	}

	@Override
	public void delete(int id) {
		teacherDao.delete(id);
	}
}
